﻿using System.Data;
using System.Data.Common;

namespace Aragorn.SOA.ORM
{
    internal class ConnectionFactory
    {
        public ConnectionFactory()
        {
        }

        public static IDbConnection CreateConnection(string providerName, string connectionString)
        {
            DbConnection dbConnection = DbProviderFactories.GetFactory(providerName).CreateConnection();
            dbConnection.ConnectionString = connectionString;
            return dbConnection;
        }
    }
}